package com.mes.service.cb;

import com.mes.dao.cb.MaStockMapper;
import com.mes.entity.cb.Cnum;
import com.mes.entity.cb.MaStock;
import com.mes.entity.cb.Pages;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

import java.util.List;

/**
 * @ClassName: MaStockServiceImpl
 * @Description: 资材库存
 * @Author cb
 * @Date 2018/4/18 14:48
 * @version 1.0
 */
@Service
@Transactional
public class MaStockServiceImpl implements MaStockService{

    @Resource
    private MaStockMapper maStockMapper;

    @Override
    public List<Cnum> maStock_list(Pages pages) {
        return maStockMapper.maStock_list(pages);
    }

    @Override
    public int maStock_listTotal(Pages pages) {
        return maStockMapper.maStock_listTotal(pages);
    }

    @Override
    public int maStock_insert(List<MaStock> list1) {
        return maStockMapper.maStock_insert(list1);
    }

    @Override
    public void maStock_deleteBy(List<String> str) {
        for (String s : str) {
        	//t
            maStockMapper.maStock_deleteBy(s);
        }
    }

	@Override
	public void update_tuihuoState(long parseLong) {
		maStockMapper.update_tuihuoState(parseLong);
		
	}

	@Override
	public List<String> storck_ByMaid(long parseLong) {
		return maStockMapper.storck_ByMaid(parseLong);
	}

	@Override
	public long sumByRuNumber(long rwid) {
		return maStockMapper.sumByRuNumber(rwid);
	}
}
